![]() |
GetIconRefFromFile |
||||
Header: | Icons.h | Carbon status: | Supported | |
Provides an IconRef for a file, folder or volume.
OSErr GetIconRefFromFile ( const FSSpec *theFile, IconRef *theIconRef, SInt16 *theLabel );
A pointer to the FSSpec structure specifying the file, folder or volume for the IconRef.
On return, a pointer to the desired icon data.
On return, a pointer to the file or folder’s label.
A result code.
Use this function if you have no information about the file object passed in the theFile parameter. If you have already called the File System Manager function PBGetCatInfo, you can use the function GetIconRefFromFolder if the object is a folder without custom icons or the function GetIconRef if the object is a file without custom icons. The GetIconRefFromFile function increments the reference count of the IconRef.
Remember to call the function ReleaseIconRef when you're done with an IconRef.
Supported in Carbon. Available in CarbonLib 1.0 and later when IconServicesLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by IconServicesLib 8.5 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/18/2000)